/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #app {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 通用工具类 */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-10 {
  margin-top: 10px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* ========== 图片预览弹窗层级修复 ========== */
/* 使用多重选择器确保优先级最高 */
.el-image-viewer__wrapper.el-image-viewer__wrapper,
body > .el-image-viewer__wrapper {
  z-index: 99999 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
}

.el-image-viewer__mask.el-image-viewer__mask {
  z-index: 99998 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(0, 0, 0, 0.5) !important;
}

.el-image-viewer__canvas {
  z-index: 99999 !important;
  position: relative !important;
}

.el-image-viewer__actions {
  z-index: 100000 !important;
  position: fixed !important;
}

/* 强制表格和卡片在普通层级 */
.el-table,
.el-card,
.el-dialog,
.carousel-list,
.product-integrated-list {
  isolation: isolate;
  z-index: auto !important;
}

